package com.study.zzedu.ui.schoolroll;

import android.content.Context;

import com.study.zzedu.base.BasePresenter;
import com.study.zzedu.base.BaseView;
import com.study.zzedu.http.OnResultListener;

public class SchoolRollPresenter extends BasePresenter<SchoolRollContract.IView> {

    private SchoolRollModel sModel;
    public SchoolRollPresenter(){
        sModel = new SchoolRollModel();
    }

    //个人信息 和 学籍信息
    public void getUserDetailMessage(Context context){
        sModel.getUserDetailMessage(context,new OnResultListener() {
            @Override
            public void onSuccess(String result) {
                getView().onGetUserDetailMessage(result);
            }

            @Override
            public void onError(String error) {
                getView().showError(error);
            }
        });
    }
    public void getUserScoreList(Context context){
        sModel.getUserScoreList(context,new OnResultListener() {
            @Override
            public void onSuccess(String result) {
                getView().onGetUserScoreList(result);
            }

            @Override
            public void onError(String error) {
                getView().showError(error);
            }
        });
    }

}
